﻿#pragma once
#include<iostream>
using namespace std;
class Time
{
public:
	Time(int hour)
		:_hour(hour)
	{
		cout << "Time()" << endl;
	}
	int gethour()
	{
		return _hour;
	}

private:
	int _hour;
};
class date
{
public:
	 date(int& y)
		:t1(3)
		, x(y)
	{
		arr = (int*)malloc(12);
		_month = 12;
		cout << _day << _month << _year << t1.gethour() << x << endl;
	}
private:
	int _day =12;
	int _year=13;
	int _month;
	int& x;
	Time t1;
	int* arr=(int*)malloc(12);

};
class A
{
public:
	// 构造函数explicit就不再⽀持隐式类型转换

		//explicit A(int a1)
		A(int a1)
		:_a1(a1)
	{
	}
	//explicit A(int a1, int a2)
	A(int a1, int a2)
		:_a1(a1)
		, _a2(a2)
	{
	}
	void Print()
	{
		cout << _a1 << " " << _a2 << endl;
	}
	int Get() const
	{
		return _a1 + _a2;
	}
private:
	int _a1 = 1;
	int _a2 = 2;
};
class stack
{
public:
	void stackpush(const A& aa)
	{
		;
	}
	void stackpush(const A& aa, const A& bb)
	{
		;
	}
	static int  getaa()
	{
		return aa;
	}
	

private:

	int a;
	static int aa;


};
int stack::aa = 1;

class B
{
public:
	B(const A& a)
		:_b(a.Get())
	{
	}
private:
	int _b = 0;
};